﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RequestDemo
{
    class RequestDemo
    {
        static void Main(string[] args)
        {
            Console.WriteLine("开始字典上传");
            ResponseBase resDic = Request.GetInstance().dicUpLoad("DIC_SEX", "男", "1");
            if (resDic != null)
            {
                Console.WriteLine("code:" + resDic.code);
                Console.WriteLine("msg:" + resDic.msg);
            }
            else
            {
                Console.WriteLine("上传异常");
            }


            Console.WriteLine("开始数据上传");
            string dataJson = JsonConvert.SerializeObject(new
            {
                lastUpdateDtime = "2018-12-01 15:30:42",
                patientId = "6666",
                cardNo = "888",
                cardTypeCode = "01"
            });
            ResponseBase resData = Request.GetInstance().dataUpload("patientCardinfo", dataJson);
            if (resData != null)
            {
                Console.WriteLine("code:" + resData.code);
                Console.WriteLine("msg:" + resData.msg);
            }
            else
            {
                Console.WriteLine("上传异常");
            }

            Console.ReadKey();

        }

    }
}
